﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using SymmetricEncription.Controls;

namespace SymmetricEncription.Presenters
{
    public class ExceptionStep: ProcessStepBase
    {
        private Exception exception;
        public Exception Exception
        {
            get { return exception; }
        }

        public ExceptionStep(Exception exception, ProcessStepBase previousStep) : base(previousStep)
        {
            this.Title = "Ошибка выполнения";
            this.exception = exception;
        }

        private ReadOnlyTextOutput stepUIControl = new ReadOnlyTextOutput();
        public override UIElement StepUIControl
        {
            get { return this.stepUIControl; }
        }

        public override bool CanGoNext
        {
            get
            {
                return false;
            }
        }

        public override ProcessStepBase GetNextStep()
        {
            return null;
        }

        public string Text
        {
            get { return this.exception.ToString(); }
        }
    }
}
